package com.heima.user.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.ApAuthor;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-article")
public interface ArticleFeign {


    @PostMapping("/api/v1/author")
    public ResponseResult<ApAuthor> saveApAuthor(@RequestBody ApAuthor apAuthor);

    @PostMapping("/api/v1/author/{id}")
    @ApiOperation(value = "查询作者", notes = "author:mcm")
    public ResponseResult<ApAuthor> getById(@PathVariable("id") Long id);
}
